-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add charset support #44
Add charset support #44
Conversation
Code wise this looks good but its not actually changing the encoding for me. I created an [*]
charset = utf-8 With additional logging i can see that everything flows as expected when saving:
but issueing the following command: $ file -bi ANSI.txt will return
If i save the file outside of visual studio (e.g with notepad) and force the encoding to utf-8 it will return:
|
Ok TIL, if visual studio thinks your file is ascii it will always save it as ascii 😄 If i insert a non ascii character these encodings are adhered to. Will add a note of this in the autcomplete (also fix the autocomplete options) |
Yeah its probably not a perfect way of doing things, but I think it follows the "softly softly" approach of EditorConfig to act as a guideline and not as an enforcer. |
Is this entirely correct? If it is, then I believe there is certain inconsistency between different rules. For example, with Now, contrasting that to |
@dliuzzi I'm only a contributor to this project, and was merely referencing the FAQ and comments here: #25 (comment). I'm not sure if this is still a goal for EditorConfig, someone with more knowledge than me would need to comment. |
@robertcoltheart I see your point now. I was just bringing up consistency as I think it makes things easier to grasp. I.e. having all rules be either one way or the other, but not both, as to not having to remember which ones act as enforcers and which as guides. In my case, I'm in favor of enforcing, but I understand if maintainers think differently. Anyway, I'm one of the people who's been eagerly expecting charset support, so you taking the time and effort to implement it is highly appreciated. |
Fixes #23.
@Mpdreamz do take a look when you have a moment.